#include<bits/stdc++.h>
using namespace std;

int main(){
  double x,y;
  cin>>x;
  if (x<0)cout<<"0.00"<<endl;
  if(x>0){
    if(x<=15){
      y=(4*x)/3;
    }else if (x>15){
      y=2.5*x-10.5;
    }
    cout<<fixed<<setprecision(2)<<y<<endl;
  }

  return 0;
}